'''
/*
 * @Author: wevsmy 
 * @Date: 2017-10-25 14:35:43 
 * @Last Modified by: wevsmy
 * @Last Modified time: 2017-10-25 14:44:47
 */
'''
from socket import *
from time import ctime
def main():
    udpSocket = socket(AF_INET,SOCK_DGRAM)

    udpSocket.bind(("", 7788))

    while True:
        recvInfo = udpSocket.recvfrom(1024)
        print("[%s]:%s"%(str(recvInfo[1]),recvInfo[0].decode("gb2312")))

if __name__ == '__main__':
    main()
    